Function.prototype.myCall=function(context,...args){
     context=context||window
     // this在调用myCall
     const fn=Symbol('fn')
     context[fn]=this
     const res= context[fn](...args)
     delete context[fn]
     return res

}

function foo(x,y){
    console.log(this.a,x+y);
}
let obj={
    a:1
}
foo.myCall(obj,1,2)

